<section class="modal fade" id="login-modal" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <div class="login_social">
                    {:Hook('SyncLogin')}
                </div>
                <div class="login-section">
                    <form class="form login-form-modal clearfix" action="{:U('user/login')}" method="post">
                        <div>
                            <legend class="legend">本站账号登录</legend>
                        </div>
                        <div class="form-group">
                            <div class="input-group">
                                <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                                <input type="text" class="form-control" placeholder="请输入用户名｜邮箱｜手机号" name="username">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="input-group">
                                <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                                <input type="password" class="form-control" placeholder="请输入密码" name="password">
                            </div>
                        </div>
                        <php>if(C('WEB_SITE_VERIFY_HOME')):</php>
                            <div class="form-group">
                                <div class="input-group">
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-picture"></i></span>
                                    <input type="text" class="form-control" placeholder="请输入验证码" name="verify">
                                </div>
                            </div>
                            <div class="form-group">
                                <img class="verifyimg reloadverify" alt="点击切换" src="{:U('user/verify')}" style="cursor:pointer;">
                            </div>
                        <php>endif;</php>
                        <div class="form-group">
                            <input type="hidden" name="forward" value="<?php echo 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];?>">
                            <button type="submit" class="btn btn-primary ajax-post btn-block" target-form="login-form-modal">登 陆</button>
                        </div>
                    </form>
                    <p class="small"><a href="javascript:$('.login-section').toggle('slow');$('.register-section').toggle('slow');">还没有帐号？立即注册</a><a class="pull-right" href="{:U('user/forgetPassword')}">忘记密码?</a></p>
                </div>
                <div class="register-section" style="display:none;">
                    <form class="form reg-form-modal clearfix" action="{:U('user/register')}" method="post">
                        <div>
                            <legend class="legend">注册新账号</legend>
                        </div>
                        <div class="form-group">
                            <label class="control-label">用户名</label>
                            <div class="input-group">
                                <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                                <input type="text" class="form-control" placeholder="请输入用户名" name="username">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">密码</label>
                            <div class="input-group">
                                <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                                <input type="password" class="form-control" placeholder="请输入密码" name="password">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">确认密码</label>
                            <div class="input-group">
                                <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                                <input type="password" class="form-control" placeholder="请再次输入密码" name="repassword">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">邮箱</label>
                            <div class="input-group">
                                <span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
                                <input type="text" class="form-control" placeholder="请输入电子邮件" name="email">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label">手机号</label>
                            <div class="input-group">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-phone"></span></span>
                                <input type="text" class="form-control" placeholder="请输入手机号码" name="mobile">
                            </div>
                        </div>
                        <php>if(C('WEB_SITE_VERIFY_HOME')):</php>
                            <div class="form-group">
                                <label class="control-label">验证码</label>
                                <div class="input-group">
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-picture"></i></span>
                                    <input type="text" class="form-control" placeholder="请输入验证码" name="verify">
                                </div>
                            </div>
                            <div class="form-group">
                                <img class="verifyimg reloadverify" alt="点击切换" src="{:U('User/verify')}" style="cursor:pointer;">
                            </div>
                        <php>endif;</php>
                        <div class="form-group">
                            <button type="submit" class="btn btn-primary btn-block ajax-post" target-form="reg-form-modal">注 册</button>
                        </div>
                    </form>
                    <p class="small"><a href="javascript:$('.register-section').toggle('slow');$('.login-section').toggle('slow');">已有帐号？立即登录</a></p>
                </div>
            </div>
        </div>
    </div>
</section>
